package thread;

public class CurrentThreadDemo {
    public static void main(String[] args) {
  Thread main=Thread.currentThread();
        System.out.println("主线程是:"+main);//主线程是:Thread[main,5,main]
         dosome();//运行dosome方法的线程是:Thread[main,5,main]
    }

    public static void dosome(){
        Thread t=Thread.currentThread() ;
            System.out.println("运行dosome方法的线程是:"+t);

    }
}
